<!--
  Generated template for the AddressPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->

<ion-header>

  <ion-navbar>
    <ion-title>我的地址</ion-title>
  </ion-navbar>

</ion-header>


<ion-content>
	<ion-refresher (ionRefresh)="doRefresh($event)">
		<ion-refresher-content></ion-refresher-content>
	</ion-refresher>

	<div *ngIf="data == '0'" class="null">
		<div class="content">
			<img src="./assets/imgs/nothing.png" alt="">
			<span>暂时没有地址,快去添加吧~</span>
		</div>
	
		
	
	</div>
	<div *ngIf="data == '1'" class="address-list">
		<div class="content" #list>
			<div class="list" *ngFor="let val of addressInfo; let id = index">

				<div class="text " (click)="editAddress()">

					<div class="info">
						<span> {{val.true_name}} &nbsp;&nbsp;&nbsp;{{val.mob_phone}}</span>
						<span>{{val.area_info + "&nbsp;&nbsp;"+val.address}}</span>
					</div>
					<div class="page">
						<span>
							<ion-icon name="arrow-forward"></ion-icon>
						</span>
						

					</div>
				</div>
				<div class="nature">
					<div class="check">
						<div [class.active]="class == id" (click)="changeDefault(id)" >
							
						</div>
						
						<span>设为默认</span>
					</div>
					<div class="delete" (click)="delete(val.address_id)">
						<span>删除</span>
					</div>
				</div>
			</div>
		</div>
	
	</div>

	<div class="button" (click)="newPage()">
		<div>
			<span>
			添加新地址
			</span>
		</div>

	</div>

</ion-content>
